<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Add Cover</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="metadata.html" class="calibreAPrev">previous page</a>
        

        
          <a href="table_of_contents.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 id="add-cover" class="calibre5">Add Cover</h2>

  <p class="h2subheading">— Pick a cover for your book —</p>

  <p class="calibre1">The Add Cover feature allows you to pick an image for your cover and have Sigil automatically make the necessary updates to mark the image as your cover.</p>

  <p class="calibre1">Add a cover by selecting the menu item <span class="shortcut">Search→Add Cover</span> or its keyboard shortcut:</p>

  <div class="image"><img alt="add-cover" src="../Images/add-cover.png" class="calibre7"/></div>

  <p class="calibre1">You can pick an image in your epub, or use <span class="buttonbox">Other Files</span> to pick one from your computer.</p>

  <h3 class="sigilnotintoc">Details</h3>

  <p class="calibre1">Sigil makes the following changes when you add a cover:</p>

  <ul class="calibre3">
    <li class="calibre4">Creates a <span class="example">cover.xhtml</span> file if one does not exist. If it does exist, it will use the file. If another file with a semantic of Cover exists, it will use that file.</li>

    <li class="calibre4">Inserts the necessary HTML code to display and resize your image into the HTML file.</li>

    <li class="calibre4">Marks the HTML cover file with the semantic of Cover.</li>

    <li class="calibre4">Marks the image file with the semantic of Cover.</li>
  </ul>

  <h3 class="sigilnotintoc">Custom HTML Cover File</h3>

  <p class="calibre1">Sigil inserts code in the HTML cover file that allows your cover to be re-sized and displayed on most ereaders, but you may want to use different code. You can edit the code after the file is created, or provide your own code for Sigil to use.</p>

  <p class="calibre1">This is the HTML code Sigil inserts into the cover file by default:</p>
  <pre class="example1">
&lt;?xml version="1.0" encoding="UTF-8" standalone="no" ?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
  &lt;title&gt;Cover&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;div style="text-align: center; padding: 0pt; margin: 0pt;"&gt;
    &lt;svg xmlns="http://www.w3.org/2000/svg" height="100%"
    preserveAspectRatio="xMidYMid meet" version="1.1" 
    viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" width="100%" 
    xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
      &lt;image width="SGC_IMAGE_WIDTH" height="SGC_IMAGE_HEIGHT" 
      xlink:href="SGC_IMAGE_FILENAME"/&gt;
    &lt;/svg&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>

  <p class="calibre1">To modify the template Sigil uses for the HTML cover file, create a file in your Preferences directory called <span class="example">cover.xhtml</span></p>

  <p class="calibre1">You can use certain placeholders in your text and Sigil will replace them with the appropriate values:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading">SGC_IMAGE_FILENAME:</span> this will be replaced by the path to the image in your EPUB.</li>

    <li class="calibre4"><span class="listheading">SGC_IMAGE_WIDTH:</span> this will be replaced by the width in pixels of your image.</li>

    <li class="calibre4"><span class="listheading">SGC_IMAGE_HEIGHT:</span> this will be replaced by the height in pixels of your image.</li>
  </ul>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="metadata.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="table_of_contents.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
